//表单序列化
export const serialize = (data) => {
  let list = []
  Object.keys(data).forEach((ele) => {
    list.push(`${ele}=${data[ele]}`)
  })
  return list.join('&')
}

export const onBack = () => {
  uni.navigateBack()
}

export const toUpperCaseFunc = (str) => {
  if (str.indexOf(' ') > 0) str = str.replace(/\s+/g, '')
  const arr = [...str]
  arr[0] = arr[0].toUpperCase()
  return arr.join('')
}
